const cookie = {
    set: function (name, value, days) {
      let d = new Date();
      d.setDate(d.getDate() + days);
      document.cookie = `${name}=${value};expires=${d};path=/`;
    },
    get: function (name) {
      let arr = document.cookie.split("; ");
      for (let value of arr) {
        let newarr = value.split("=");
        if (name === newarr[0]) {
          return newarr[1];
        }
      }
    },
    remove: function (name) {
      this.set(name, "", -1);
    },
  };
export{
    cookie
}